<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Vue Homework</title>
</head>
<body>
<div id="el">
    <button @click="clickHandler">click</button>
    <div>{{dog.name}}</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
    let vm = new Vue({
        el: '#el',
        data: {
            o: 'object',
            dog: {
                // name: ''
            }
        },
        methods: {
            clickHandler () {
                // 该 name 属性是否是响应式的
                this.dog.name = 'Trump'
                // this.dog = {name: 'Trump'}
                // this.$set(this.dog, 'name', 'Trump')
            }
        }
    })

    Object.defineProperty()
</script>
</body>
</html>
